//
//  LandingPageViewController.m
//  CareWithFriends
//
//  Created by Versatile Systems, Inc on 11/11/13.
//  Copyright (c) 2013 Muludiang. All rights reserved.
//

#import "LandingPageViewController.h"
#import "PageManager.h"

@interface LandingPageViewController ()

@end

@implementation LandingPageViewController

@synthesize scrollView;
@synthesize pageControl;
@synthesize arrayViews;
@synthesize pages;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view

}

-(void)viewDidAppear:(BOOL)animated{
    arrayViews = [NSArray arrayWithObjects:[self.storyboard instantiateViewControllerWithIdentifier:@"main_menu_view"],[self.storyboard instantiateViewControllerWithIdentifier:@"update_nav"],[self.storyboard instantiateViewControllerWithIdentifier:@"stats_nav"],[self.storyboard instantiateViewControllerWithIdentifier:@"profile_view"],nil];
    pages = [[PageManager alloc] initWithScrollView:self.scrollView pageControl:self.pageControl];
    
    [pages loadControllerViews:arrayViews];
}
- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
